<#assign module="member"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
</@override>
<@override name="body">

	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default" style="min-height:610px;">
				<div class="panel-heading">
					发布通知
			    </div>
			    <div class="panel-body">
    				<form id="submit_form" action="${ctx}/membernotice/create" class="form-horizontal" method="post">
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"></label>
		                    <div class="col-sm-6">
		                    	<font color="red">注：遵守国家有关法律、行政法规和管理规章，请勿发送垃圾、广告、以及其他含有法律，行政法规禁止内容的短信。一经发现，将做封号处理（短信费用不退还）。</font>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>内容：</label>
		                    <div class="col-sm-6">
		                    	<textarea class="form-control" id="content" name="content" rows="8" ></textarea>
		                    	<span>每64个字符（空格也算作一个字符）算作为一条短信，当前显示长度不包含签名，<font color="red">应短信通道要求，系统会在末尾自动加上退订回复TD</font>，最终短信内容将增加签名长度和退订回复TD的长度，已输入<span id="putWords" style="color:red;">0</span>个字符。</span>
		                    	<br/>
                        		<font color="red">注：填写内容时请勿回车换行，否则可能导致发送短信时长度不一致</font>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label">详细说明：</label>
		                    <div class="col-sm-7">
		                    	<textarea class="form-control" id="contentMore" name="contentMore" rows="8"></textarea>
		                    	<span>该详细说明为非必填，填写后会为发送的内容中自动加入该详细说明的网页地址</span>
		                    </div>
		                </div>
		                
		                <h4>筛选条件</h4>
		                <hr/>
		                
		                <div class="form-group">
		                	<label class="col-sm-2 control-label">车牌号：</label>
		                	<div class="col-sm-2">
								<input class="form-control" type="text" id="carNumber" name="carNumber" />
							</div>
							
							<label class="col-sm-1 control-label">客户姓名：</label>
		                	<div class="col-sm-3">
								<input class="form-control" type="text" id="name" name="name" />
							</div>
							
							<label class="col-sm-1 control-label">客户电话：</label>
		                	<div class="col-sm-2">
								<input class="form-control" type="text" id="phone" name="phone" />
							</div>
					    </div>
					    <div class="form-group">
					    
					    	<label class="col-sm-1 control-label"></label>
					    	
					    	<@shiro.isMainCompany>
			                    <label class="col-sm-1 control-label">所属公司：</label>
			                    <div class="col-sm-2">
			                    	<input type="hidden" id="companyName" name="companyName" value="" />
			                    	<select class="form-control" id="companyIds" name="companyIds" multiple="multiple">
			                    		<#if companys??>
			                    			<#list companys as company>
			                    				<option value="${company.id}">${company.abbreviation?if_exists}</option>
			                    			</#list>
			                    		</#if>
			                    	</select>
			                    </div>
							</@shiro.isMainCompany>
							
							<label class="col-sm-1 control-label">注册时间：</label>
		                	<div class="col-sm-3">
								<div class="input-group">
								  <input type="text" class="form-control" id="startTime" name="startTime">
								  <span class="input-group-addon">到</span>
								  <input type="text" class="form-control" id="endTime" name="endTime">
								</div>
							</div>
							
					    </div>
					    
					    <div class="form-group">
					    	<label class="col-sm-2 control-label">用户等级：</label>
		                	<div class="col-sm-10">
		                		<p class="form-control-static">
		                			<#if grades??>
		                				<#list grades as grade>
											<label style="padding-right:12px;">
											  <input type="checkbox" name="gradeIds" value="${grade.id}"/> ${grade.name?if_exists}
											</label>
										</#list> 
									</#if>
								</p>
							</div>
					    </div>
					    
					    <div class="form-group">
					    	<label class="col-sm-2 control-label">用户类型：</label>
		                	<div class="col-sm-10">
		                		<p class="form-control-static">
									<label style="padding-right:12px;">
									  <input type="checkbox" name="type" value="0"/> 个人用户
									</label>
									<label style="padding-right:12px;">
									  <input type="checkbox" name="type" value="1"/> 企业用户
									</label>
								</p>
							</div>
					    </div>
					    
					    <div class="form-group">
					    	<label class="col-sm-2 control-label">是否签单：</label>
		                	<div class="col-sm-10">
		                		<p class="form-control-static">
									<label style="padding-right:12px;">
									  <input type="checkbox" name="allowOverdraw" value="true"/> 是
									</label>
									<label style="padding-right:12px;">
									  <input type="checkbox" name="allowOverdraw" value="false"/> 否
									</label>
								</p>
							</div>
					    </div>
					    
					    <h4>发送方式</h4>
		                <hr/>
		                
		                <div class="form-group">
					    	<label class="col-sm-2 control-label"><em>*</em>发送方式：</label>
		                	<div class="col-sm-10">
		                		<p class="form-control-static">
		                			<@shiro.hasPermission name='membersms'>
										<label style="padding-right:12px;">
										  <input type="checkbox" name="sendType" value="sms"/> 短信
										</label>
									</@shiro.hasPermission>
									<@shiro.hasPermission name='memberappnotice'>
									<label style="padding-right:12px;">
									  <input type="checkbox" name="sendType" value="message"/> 应用通知
									</label>
									</@shiro.hasPermission>
								</p>
							</div>
					    </div>
		                
		                <div class="form-group" style="margin-left:10px;">
			                <label class="col-sm-3 control-label"></label>
			                <input id="submit_button" type="submit" class="btn btn-primary" value="发布">
			                <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/membernotice/list';" value="返回">
			            </div>
			            
					</form>
        		</div>
			</div>
		</div>
	</div>

</@override>
<@override name="footer">
<script src="${ctx}/assets/js/bootstrap-multiselect.js"></script>
<script src="${ctx}/assets/kindeditor/kindeditor-all-min.js"></script>
<script src="${ctx}/assets/kindeditor/lang/zh_CN.js"></script>
<script src="${ctx}/assets/js/datepicker.js"></script>
<script src="${ctx}/assets/js/membernotice/add.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	
	});
</script>
</@override>
<@extends name="../layout.ftl"/>
